<?php
declare (strict_types = 1);

namespace app\model;

use think\Model;

/**
 * @property \app\model\TalentAssessTip $tip 提示内容
 * @property bool $tip_type 提示类型:0=无,1=弹窗,2=详情
 * @property bool $type 类型:1=单选,2=多选
 * @property int $id
 * @property int $max_score 最大分数
 * @property int $pid 父类
 * @property int $score 分数
 * @property int $tip_id 提示
 * @property string $createtime
 * @property string $name 标题
 * @property-read \app\model\TalentAssess[] $option
 * @mixin \think\Model
 */
class TalentAssess extends Model
{
    protected $createTime = 'createtime';

    function option()
    {
        return $this->hasMany(TalentAssess::class,'pid');
    }

    function tip()
    {
        return $this->belongsTo(TalentAssessTip::class,'tip_id');
    }
}
